// 在函数之间多次传递地址

#include <iostream>
using namespace std;

void GetXY(double* x, double* y);
void GetX(double* x);
void GetY(double* y);

int main() {
    double x, y;
    GetXY(&x, &y);
    cout << "x = " << x << ", y = " << y << "\n";
    cout << "再见!\n";
}

void GetXY(double* x, double* y) {
    GetX(x);
    GetY(y);
}

void GetX(double *x) {
    cout << "请输入X的值: ";
    cin >> *x;
}

void GetY(double *y) {
    cout << "请输入Y的值: ";
    cin >> *y;
}